package model;

import java.util.ArrayList;
import java.util.List;

public class Teacher extends User {
    private List<Course> coursesTaught;  // 所教课程

    public Teacher(String id, String name, String gender) {
        super(id, name, gender);
        coursesTaught = new ArrayList<>();
    }

    // 添加所教课程
    public void addCourse(Course course) {
        coursesTaught.add(course);
    }

    public List<Course> getCoursesTaught() {
        return coursesTaught;
    }
}
